<tagLib name="html" />
<include file="Public:header" />
			<include file="Public:menu" />
			<div id="right">
				<div>
					<div id="boardheader">
						<img src='__PUBLIC__/Uploads/group/{$group.img}'/>
						<p class="grouptop">{$group:name}-- 讨论区</p>
						<p class="backgroup"><a href="__APP__/showgroup/{$group:id}">返回群组</a></p>

					</div>
					<div>
						{$page}
					</div>
					<script type="text/javascript" src="__PUBLIC__/Js/FCKeditor/fckeditor.js"></script>
					<div class="groupbody">
						<div class="topictitle">
							{$topic:title|htmlspecialchars}
						</div>
						<div>
							<div class="revertshow">
								<div class="revertlist">
									<div class="revert_username_face">
										<a href="__APP__/home/{$topic:userid}"><img src="__PUBLIC__/Uploads/face/small/{$topic:faceimg}"/></a>
									</div>
									<div class="revertcontent">
										<div class="reverttitle"><a href="__APP__/home/{$topic:userid}">{$topic:username}($topic:network_city)</a>  {$topic:regtime|toDate} <a href="#newtopic" class="revert_revert" reuser="0" id="0">回复</a>  <span class="floor">楼主</span>  <php>if($topic->userid == $userInfo->id){</php><a href="__URL__/edittopic/id/{$topic:id}" class="edittopic" id="{$topic:id}">编辑</a><php>}</php></div>
										<div class="revert_content">{$topic:content}</div>
									</div>
								</div>
							</div>
						</div>
						<volist name="revert" id="revert">
						<div>
							<div class="revertshow">
								<a name="revert{$revert:id}"></a>
								<div class="revertlist">
									<div class="revert_username_face">
										<a href="__APP__/home/{$revert:userid}"><img src="__PUBLIC__/Uploads/face/small/{$revert:faceimg}"/></a>
									</div>
									<div class="revertcontent">
										<div class="reverttitle"><a href="__APP__/home/{$revert:userid}">{$revert:username}($revert:network_city)</a> {$revert:reverttime|toDate} <a href="#newtopic" class="revert_revert" reuser="{$revert:userid}" id="{$revert:id}">回复</a>  <span class="floor">{$i}楼</span> <php>if($revert->userid == $userInfo->id){</php><a href="#revert{$revert:id}" class="editrevert" id="{$revert:id}">编辑</a><php>}</php> <php>if(($revert->userid == $userInfo->id) || ($isManager==1)){</php>| <a href="__URL__/deleterevert/gid/{$revert:groupid}/id/{$revert:id}" class="delrevert" id="{$revert:id}">删除</a><php>}</php> </div>
										<div class="revert_content">{$revert:content}</div>
									</div>
								</div>
							</div>
						</div>
						</volist>
					</div>

					<div class="groupbody">
						{$page}
					</div>

					<div class="groupbody">
						<php>
								if($isManager == 0){
							</php>
							<div>你还不是群组成员，请<a href="__URL__/joingroup/id/{$topic:groupid}">加入</a>后回复话题</div>
							<php>}else{</php>
						<div class="revertform">
							<a name="newtopic"></a>
							<h4>回复主题</h4>
							<div id="revertfrom">
							</div>
							<form action="__URL__/saveRevert" method="post">
							<p class="newtopic">
								<label>内容</label>
								
								<textarea id="content" name="content"></textarea>
								<script type="text/javascript"> 
									var oFCKeditor = new FCKeditor( "content","340px;","200px","Basic" ) ; 
									oFCKeditor.BasePath = "__PUBLIC__/Js/FCKeditor/" ; 
									oFCKeditor.ReplaceTextarea() ;
									function resetEditor(){setContents("content",document.getElementById("content").value)}; 
									function saveEditor(){document.getElementById("content").value = getContents("content");} 
								</script>
							</p>
							<p>
								<input type="hidden" name="groupid" id="groupid" value="{$group:id}"/>
								<input type="hidden" name="topicid" id="topicid" value="{$topic:id}"/>
								<input type="hidden" name="revertid" id="revertid" value="0"/>
								<input type="hidden" name="reuserid" id="reuserid" value="0"/>
								<input type="submit" value="回复主题"/>
							</p>
							</form>
						</div>
						<php>}</php>
						<div class="topicaction">
							<ul class="groupul">
								
								<php>
									if($isManager > 1){
										if($topic->istop == 0){
									</php>
									<li><a id="toptopic" href="__URL__/toptopic/gid/{$topic:groupid}/id/{$topic:id}" title="top">置顶本主题</a></li>
									<php>}else{</php>
									<li><a id="toptopic" href="__URL__/untoptopic/gid/{$topic:groupid}/id/{$topic:id}" title="untop">取消置顶</a></li>
									<php>
										}
									}
									if( ($topic->userid == $userInfo->id) || ($isManager > 1) ){
								</php>
								<li><a id="deltopic" href="__URL__/deletetopic/gid/{$topic:groupid}/id/{$topic:id}">删除本主题</a></li>
								<php>}</php>
							</ul>
						</div>
					</div>
				</div>
				<div class="share">
					<a class="addshare" href="__APP__/share/addshare/g/topic/id/{$topic:id}"><img src="../Public/images/share.gif"/></a>
				</div>
			</div>
<include file="Public:footer" />